using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Make Image Server Layer</para>
    /// <para>Creates a temporary raster layer from an image service. The layer that is created will not persist after the session ends unless the document is saved.</para>
    /// <para>从影像服务创建临时栅格图层。除非保存文档，否则创建的图层在会话结束后不会保留。</para>
    /// </summary>    
    [DisplayName("Make Image Server Layer")]
    public class MakeImageServerLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeImageServerLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_image_service">
        /// <para>Input Image Service</para>
        /// <para><xdoc>
        ///   <para>The name of the input image service or the SOAP URL that references the image service. Browse to or type the input image service. This tool can also accept a SOAP URL that references the image service.</para>
        ///   <para>An example of using the image service name called ProjectX is: C:\MyProject\ServerConnection.ags\ProjectX.ImageServer.</para>
        ///   <para>An example of a URL is http://AGSServer:8399/arcgis/services/ISName/ImageServer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入影像服务的名称或引用影像服务的 SOAP URL。浏览或键入输入影像服务。此工具还可以接受引用影像服务的 SOAP URL。</para>
        ///   <para>使用名为 ProjectX 的影像服务名称的示例是：C：\MyProject\ServerConnection.ags\ProjectX.ImageServer。</para>
        ///   <para>URL 的一个示例是 http://AGSServer:8399/arcgis/services/ISName/ImageServer。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_imageserver_layer">
        /// <para>Output Image Server Layer</para>
        /// <para>The name of the output image layer.</para>
        /// <para>输出图像图层的名称。</para>
        /// </param>
        public MakeImageServerLayer(object _in_image_service, object _out_imageserver_layer)
        {
            this._in_image_service = _in_image_service;
            this._out_imageserver_layer = _out_imageserver_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Make Image Server Layer";

        public override string CallName => "management.MakeImageServerLayer";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem"];

        public override object[] ParameterInfo => [_in_image_service, _out_imageserver_layer, _template, _band_index, _mosaic_method, _order_field, _order_base_value, _lock_rasterid, _cell_size, _where_clause, _processing_template];

        /// <summary>
        /// <para>Input Image Service</para>
        /// <para><xdoc>
        ///   <para>The name of the input image service or the SOAP URL that references the image service. Browse to or type the input image service. This tool can also accept a SOAP URL that references the image service.</para>
        ///   <para>An example of using the image service name called ProjectX is: C:\MyProject\ServerConnection.ags\ProjectX.ImageServer.</para>
        ///   <para>An example of a URL is http://AGSServer:8399/arcgis/services/ISName/ImageServer.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入影像服务的名称或引用影像服务的 SOAP URL。浏览或键入输入影像服务。此工具还可以接受引用影像服务的 SOAP URL。</para>
        ///   <para>使用名为 ProjectX 的影像服务名称的示例是：C：\MyProject\ServerConnection.ags\ProjectX.ImageServer。</para>
        ///   <para>URL 的一个示例是 http://AGSServer:8399/arcgis/services/ISName/ImageServer。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Image Service")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_image_service { get; set; }


        /// <summary>
        /// <para>Output Image Server Layer</para>
        /// <para>The name of the output image layer.</para>
        /// <para>输出图像图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Image Server Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_imageserver_layer { get; set; }


        /// <summary>
        /// <para>Template Extent</para>
        /// <para><xdoc>
        ///   <para>The output extent of the image layer.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>影像图层的输出范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于数据框或可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Template Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _template { get; set; } = null;


        /// <summary>
        /// <para>Bands</para>
        /// <para>Choose which bands to export for the layer. If no bands are specified, all the bands will be used in the output.</para>
        /// <para>选择要为图层导出的波段。如果未指定波段，则将在输出中使用所有波段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bands")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _band_index { get; set; } = null;


        /// <summary>
        /// <para>Mosaic Method</para>
        /// <para><xdoc>
        ///   <para>The mosaic method defines how the mosaic is created from different rasters.</para>
        ///   <bulletList>
        ///     <bullet_item>Seamline—Smooth transitions between images using seamlines.</bullet_item><para/>
        ///     <bullet_item>Northwest—Display imagery that is closest to the northwest corner of the mosaic dataset boundary.</bullet_item><para/>
        ///     <bullet_item>Center—Display imagery that is closest to the center of the screen.</bullet_item><para/>
        ///     <bullet_item>Lock raster—Select specific raster datasets to display.</bullet_item><para/>
        ///     <bullet_item>By attribute—Display and prioritize imagery based on a field in the attribute table.</bullet_item><para/>
        ///     <bullet_item>Nadir—Display the rasters with viewing angles closest to zero.</bullet_item><para/>
        ///     <bullet_item>Viewpoint—Display imagery that is closest to a selected viewing angle.</bullet_item><para/>
        ///     <bullet_item>None—Order rasters based on the ObjectID in the mosaic dataset attribute table.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>镶嵌方法定义如何从不同的栅格创建镶嵌。</para>
        ///   <bulletList>
        ///     <bullet_item>接缝线 （Seamline） - 使用接缝线在图像之间平滑过渡。</bullet_item><para/>
        ///     <bullet_item>西北 - 显示最接近镶嵌数据集边界西北角的影像。</bullet_item><para/>
        ///     <bullet_item>居中 - 显示最靠近屏幕中心的影像。</bullet_item><para/>
        ///     <bullet_item>锁定栅格 - 选择要显示的特定栅格数据集。</bullet_item><para/>
        ///     <bullet_item>按属性 - 根据属性表中的字段显示影像并确定影像的优先级。</bullet_item><para/>
        ///     <bullet_item>最低点 - 显示视角最接近于零的栅格。</bullet_item><para/>
        ///     <bullet_item>视点 - 显示最接近选定视角的影像。</bullet_item><para/>
        ///     <bullet_item>无 - 根据镶嵌数据集属性表中的 ObjectID 对栅格进行排序。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _mosaic_method { get; set; } = null;


        /// <summary>
        /// <para>Order Field</para>
        /// <para>The default field to use to order the rasters when the mosaic method is By_Attribute. The list of fields is defined as those in the service table that are of type metadata and are integer (for example, the values can represent dates or cloud cover percentage).</para>
        /// <para>By_Attribute镶嵌方法时用于对栅格进行排序的默认字段。字段列表定义为服务表中元数据类型为整数的字段（例如，这些值可以表示日期或云量百分比）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Order Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _order_field { get; set; } = null;


        /// <summary>
        /// <para>Order Base Value</para>
        /// <para>The images are sorted based on the difference between this input value and the attribute value in the specified field.</para>
        /// <para>根据此输入值与指定字段中的属性值之间的差异对图像进行排序。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Order Base Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _order_base_value { get; set; } = null;


        /// <summary>
        /// <para>Lock Raster ID</para>
        /// <para>The raster ID or raster name to which the service should be locked, such that only the specified rasters are displayed. If left blank (undefined), it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list.</para>
        /// <para>服务应锁定到的栅格 ID 或栅格名称，以便仅显示指定的栅格。如果留空（未定义），则与系统默认值类似。多个 ID 可以定义为以分号分隔的列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Lock Raster ID")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _lock_rasterid { get; set; } = null;


        /// <summary>
        /// <para>Output Cell Size</para>
        /// <para>The cell size for the output image service layer.</para>
        /// <para>输出影像服务图层的像元大小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Cell Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Expression</para>
        /// <para>Using SQL, you can define a query or use the Query Builder to build a query.</para>
        /// <para>使用 SQL，可以定义查询或使用查询生成器生成查询。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Processing Template</para>
        /// <para><xdoc>
        ///   <para>The raster function processing template that can be applied on the output image service layer.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No processing template.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>可应用于输出影像服务图层的栅格函数处理模板。</para>
        ///   <bulletList>
        ///     <bullet_item>无 （None） - 无处理模板。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Template")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _processing_template { get; set; } = null;


        public MakeImageServerLayer SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem);
            return this;
        }

    }

}